TextField supports transfer of the primary, secondary, and
clipboard selections and dragging of selected text from the
widget. TextField can also be the destination for the
primary, secondary, and clipboard selections, and it
supports dropping of data being dragged onto the widget.
When the XXXXmmmmNNNNccccoooonnnnvvvveeeerrrrttttCCCCaaaallllllllbbbbaaaacccckkkk procedures are called, the
llllooooccccaaaattttiiiioooonnnn____ddddaaaattttaaaa member of the XXXXmmmmCCCCoooonnnnvvvveeeerrrrttttCCCCaaaallllllllbbbbaaaacccckkkkSSSSttttrrrruuuucccctttt member
A pointer to the following structure is passed to each
callback:
typedef struct
{
int _r_e_a_s_o_n;
XEvent * _e_v_e_n_t;
} XmAnyCallbackStruct;
_r_e_a_s_o_n Indicates why the callback was invoked
_e_v_e_n_t Points to the _X_E_v_e_n_t that triggered the callback
The TextField widget defines a new callback structure for
use with verification callbacks. Note that not all of the
fields are relevant for every callback reason. The
application must first look at the _r_e_a_s_o_n field and use only
the structure members that are valid for the particular
reason. The values _s_t_a_r_t_P_o_s, _e_n_d_P_o_s, and _t_e_x_t in the
callback structure XXXXmmmmTTTTeeeexxxxttttVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkkSSSSttttrrrruuuucccctttt may be
modified upon receiving the callback, and these changes will
be reflected as the change made to the source of the
TextField widget. (For example, all keystrokes can be
converted to spaces or NULL characters when a password is
entered into a TextField widget.) The application programmer
should not overwrite the _t_e_x_t field, but should attach data
to that pointer.
A pointer to the following structure is passed to the
callbacks for XXXXmmmmNNNNlllloooossssiiiinnnnggggFFFFooooccccuuuussssCCCCaaaallllllllbbbbaaaacccckkkk,
XXXXmmmmNNNNmmmmooooddddiiiiffffyyyyVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk, and XXXXmmmmNNNNmmmmoooottttiiiioooonnnnVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk.
The TextField button event translations are modified when
Display's XXXXmmmmNNNNeeeennnnaaaabbbblllleeeeBBBBttttnnnn1111TTTTrrrraaaannnnssssffffeeeerrrr resource does not have a
value of XXXXmmmmOOOOFFFFFFFF (in other words, it is either
XXXXmmmmBBBBUUUUTTTTTTTTOOOONNNN2222____TTTTRRRRAAAANNNNSSSSFFFFEEEERRRR or XXXXmmmmBBBBUUUUTTTTTTTTOOOONNNN2222____AAAADDDDJJJJUUUUSSSSTTTT). This option allows
the actions for selection and transfer to be integrated on
<<<<BBBBttttnnnn1111>>>>. The actions for <<<<BBBBttttnnnn1111>>>> that are defined above still
apply when the <<<<BBBBttttnnnn1111>>>> event occurs over text that is not
selected. The following actions apply when the <<<<BBBBttttnnnn1111>>>> event
XXXXmmmmNNNNggggaaaaiiiinnnnPPPPrrrriiiimmmmaaaarrrryyyyCCCCaaaallllllllbbbbaaaacccckkkk and XXXXmmmmNNNNmmmmoooottttiiiioooonnnnVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk
procedures. See callback description for more
information.
forward-character(_e_x_t_e_n_d):
Moves the insertion cursor one character to the
right. This action may have different behavior in
a right-to-left language environment.
If called with an argument of _e_x_t_e_n_d, moves the
insertion cursor as in the case of no argument and
extends the current selection.
The forward-character() action produces calls to
the XXXXmmmmNNNNmmmmoooottttiiiioooonnnnVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk procedures with reason
value XXXXmmmmCCCCRRRR____MMMMOOOOVVVVIIIINNNNGGGG____IIIINNNNSSSSEEEERRRRTTTT____CCCCUUUURRRRSSSSOOOORRRR. If called with
the _e_x_t_e_n_d argument, the forward-character()
action may produce calls to the
XXXXmmmmNNNNggggaaaaiiiinnnnPPPPrrrriiiimmmmaaaarrrryyyyCCCCaaaallllllllbbbbaaaacccckkkk procedures. See callback
description for more information.
forward-word(_e_x_t_e_n_d):
If this action is called with no argument, moves
the insertion cursor to the first whitespace
character or end-of-line following the next non-
whitespace character. If the insertion cursor is
already at the end of a word, moves the insertion
cursor to the end of the next word. This action
may have different behavior in a locale other than
the C locale.
If called with an argument of _e_x_t_e_n_d, moves the
insertion cursor as in the case of no argument and
extends the current selection.
The forward-word() action produces calls to the
XXXXmmmmNNNNmmmmoooottttiiiioooonnnnVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk procedures with reason
value XXXXmmmmCCCCRRRR____MMMMOOOOVVVVIIIINNNNGGGG____IIIINNNNSSSSEEEERRRRTTTT____CCCCUUUURRRRSSSSOOOORRRR. If called with
the _e_x_t_e_n_d argument, the forward-word() action may
produce calls to the XXXXmmmmNNNNggggaaaaiiiinnnnPPPPrrrriiiimmmmaaaarrrryyyyCCCCaaaallllllllbbbbaaaacccckkkk
procedures. See callback description for more
information.
grab-focus():
This key binding performs the action defined in
the XXXXmmmmNNNNsssseeeelllleeeeccccttttiiiioooonnnnAAAArrrrrrrraaaayyyy, depending on the number of
times, for the ____MMMMOOOOTTTTIIIIFFFF____DDDDRRRROOOOPPPP selection.
If no selection exists or the pointer is outside
the selection, this action prepares to start a
secondary selection at the pointer position.
process-cancel():
Cancels the current extend-adjust(), secondary-
adjust()or process-bdrag()operation and leaves the
selection state as it was before the operation;
otherwise, and if the parent is a manager, it
passes the event to the parent.
secondary-adjust():
Extends the secondary selection to the pointer
position.
The secondary-adjust() action produces no
callbacks.
secondary-start():
Marks the beginning of a secondary selection.
The secondary-start() action produces no
callbacks.
select-all():
Selects all text.
The select-all() action can produce no callbacks,
however, it may produce calls to the
XXXXmmmmNNNNggggaaaaiiiinnnnPPPPrrrriiiimmmmaaaarrrryyyyCCCCaaaallllllllbbbbaaaacccckkkk and XXXXmmmmNNNNmmmmoooottttiiiioooonnnnVVVVeeeerrrriiiiffffyyyyCCCCaaaallllllllbbbbaaaacccckkkk
procedures. See callback description for more
information.
self-insert():
If XXXXmmmmNNNNppppeeeennnnddddiiiinnnnggggDDDDeeeelllleeeetttteeee is True and the cursor is not
XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddSSSShhhhoooowwwwPPPPoooossssiiiittttiiiioooonnnn(3), and XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddXXXXYYYYTTTTooooPPPPoooossss(3).